package com.hbnu.gui.application;

import com.hbnu.gui.constant.Views;
import com.hbnu.gui.util.WindowManager;
import javafx.application.Application;
import javafx.stage.Stage;

public class FXApplication extends Application {
    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) {
        setLogBackXml();
        setWindow();
    }

    private void setLogBackXml() {
        System.setProperty("logback.configurationFile", "config/logback.xml");
    }

    private void setWindow() {
        WindowManager windowManager = WindowManager.getInstance();
        windowManager.setPrimaryView(Views.LOGIN);
        windowManager.showView(Views.LOGIN);
    }
}